<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var weather = '晴朗';

      switch (weather) {
        case '晴朗':
          console.log('去打篮球');
          break;
        case '下雨':
          console.log('收衣服');
          break;
        case '下雪':
          console.log('堆雪人');
          break;
        default:
          console.log('学习');
          break;
      }
    </script>
  </body>
</html>
